package com.ciwong.epaper.modules.epaper.adapter;

import android.view.View;
import android.widget.ListAdapter;
import android.widget.TextView;

import com.ciwong.epaper.R;
import com.ciwong.epaper.modules.epaper.bean.SearchBookKeyNameBean;
import com.ciwong.epaper.modules.epaper.bean.SearchingBookBean;
import com.ciwong.epaper.modules.me.adapter.BaseCommonAdapter;

import java.util.List;

/**
 * Created by Administrator on 2017/8/18.
 */

public class HotWordAdapter extends BaseCommonAdapter {
    public HotWordAdapter(List<SearchBookKeyNameBean> dataList) {
        super(dataList);
    }

    @Override
    public int getItemResId(int position) {
        return R.layout.item_hot_word;
    }

    @Override
    public Object createViewHolder(View convertView, int position) {
        ViewHolder viewHolder = new ViewHolder();
        viewHolder.tv_hot_word = (TextView) convertView.findViewById(R.id.tv_hot_word);

        return viewHolder;
    }

    @Override
    public void showData(Object bean, Object holder, int position) {
        ViewHolder viewHolder = (ViewHolder) holder;
        SearchBookKeyNameBean hot_word = (SearchBookKeyNameBean) bean;
        viewHolder.tv_hot_word.setText(hot_word.keyName);
    }
    private class ViewHolder{
        public TextView tv_hot_word;
    }
}
